package com.example.tuter.util;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.util.HashMap;
import java.util.Map;

public class StringUtils {






    public static Map<String ,String > getInputTagByString(String s){
        if("".equals(s)) return null;
        Map<String ,String > map = new HashMap<>();
        try{
            Document d = Jsoup.parse(s);
            Elements input = d.select("input");
            for (Element element : input) {
                map.put(element.id(),element.val());
            }
        }catch (Exception e){
            return null;
        }
        return map;


    }
}
